package com.starchen.optimalselection.common.utils;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * @author daxilong
 * @date 2024/8/4 0:11
 */
public class PageUtils {

    public static IPage getPage(Integer pageIndex,Integer pageSize) {
        //分页参数
        long curPage = 1;
        long limit = 10;

        if(pageIndex != null){
            curPage = pageIndex;
        }
        if(pageSize != null){
            limit = pageSize;
        }
        Page page = new Page(curPage, limit);
        return page;
    }
}
